package bestTeam.WalkieDoggie.client;

import java.util.Comparator;
import java.util.Date;

import bestTeam.WalkieDoggie.client.Serializables.UserRequest;

public class volunteerComperator implements Comparator<UserRequest>{

	private int order=1;
	
	public volunteerComperator(int ord){
		order=ord;
	}
	
	@Override
	public int compare(UserRequest o1, UserRequest o2) {

		int d1=o1.getNumofVolunteers();
		int d2=o2.getNumofVolunteers();
		return (d1-d2) * order;
	}

}
